<template>
	<view id="public">
		<!-- 背景半椭圆 -->
		<view id="background-top" />
		
		<!-- 广告板块 -->
		<view class="swiper">
			<image src="../../../static/img/swiper/swiper0.jpg" mode="scaleToFill"></image>
		</view>
		
		<!-- 服务板块 -->
		<view class="service-list">
			<view class="service-item" v-for="item in serviceList" :key="item.name">
				<uni-icons :type="item.icon" size="40px" color="#3a3a3a"></uni-icons>
				<view class="item-name">
					{{item.name}}
				</view>
			</view>
		</view>
		
		<!-- 技术推文列表 -->
		<view class="activity-list">
			
			<view class="list-title">
				公益活动
			</view>
			<!-- 单例 -->
			<view class="activity-item" v-for="item in 5" :key="item">
				活动{{item}}
			</view>
			<view class="reachBottom">
				<uni-load-more iconType="circle" :content-text="{contentdown:'加载更多'}" status="noMore" />
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				searchValue:'',
				
				serviceList:[
					{icon:'staff',name:"合作伙伴"},
					{icon:'home',name:"报名窗口"}
				]
			}; 
		},
		methods:{
			toSearch(){
				
			}
		}
	}
</script>

<style lang="scss" scoped>
	#background-top{
		margin: 0!important;
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 150px;
		background-color: #ec3525;
		border-radius: 0 0 30% 30%;
		z-index: -10;
	}
	#public{
		margin-top: 10px;
		>view{
			margin: 0 10px;
		}
		
		// 广告板块
		.swiper{
			margin-top: 10px;
			border-radius: 10px;
			overflow: hidden;
			
			
			>image{
				width: 100%;
				height: 150px;
				border-radius: 10px;
			}
		}
		
		// 服务板块
		.service-list{
			margin-top: 10px;
			display: flex;
			justify-content: space-between;
			align-items: center;
			flex-wrap: wrap;
			background-color: #fff;
			border-radius: 8px;
			box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.08);
			
			.service-item{
				width: calc(50% - 5px);
				padding: 10px;
				text-align: center;
				
				.item-name{
					font-size: 14px;
					// font-weight: bold;
				}
			}
		}
		
		// 活动列表
		.activity-list{
			margin: 0;
			margin-top: 10px;
			padding: 10px;
			padding-top: 5px;
			display: flex;
			align-items: center;
			flex-direction: column;
			background-color: #fff;
			border-radius: 20px 20px 0 0;
			// border: 1px solid rgba(0, 0, 0, 0.1);
			box-shadow: 0px -7px 3px -7px rgba(0, 0, 0, 0.08);
			
			.list-title{
				z-index: 10;
				position: sticky;
				top: 0;
				font-size: 16px;
				text-align: center;
				color: #909399;
				padding: 5px 0;
				font-weight: bold;
				background-color: #fff;
				width: 100%;
			}
			
			.activity-item{
				margin-bottom: 10px;
				width: 100%;
				height: 100px;
				border-radius: 10px;
				background-image: linear-gradient(120deg, #ec3525 0%, #fda085 100%);
				
				// 
				padding: 10px;
				font-size: 18px;
				font-weight: bold;
				color: white;
			}
		}
	}
</style>
